package cn.dzhang.spring.web.controler;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import cn.dzhang.spring.model.User;

@Controller
public class HomeController {

	@RequestMapping("/")
	public String index() {
		return "index";
	}

	@RequestMapping("/login")
	public ModelAndView login() {
		return new ModelAndView("users/login", "user", new User());
	}
}
